package com.ssyt.yt1.day14;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

/**
 * Scanner读取文本信息
 * 
 * @author Administrator
 *
 */
public class ScannerDemo {

	public static void main(String[] args) throws FileNotFoundException {
		Scanner scanner = new Scanner(new File("F:\\a.txt"));
		StringBuilder sb = new StringBuilder();
		while (scanner.hasNext()) {
			sb.append(scanner.nextLine());
		}
		System.out.println(sb.toString());
	}
}
